// pages/my/my.js 
Page({
  data: {
    userInfo: null,
    isVerified: false // 初始为未验证
  },
  
  onShow() {
    const userInfo = wx.getStorageSync('userInfo');
    const studentData = wx.getStorageSync('student');
    const verifiedData = wx.getStorageSync('verifiedStudentData');
    
    // 更新用户信息
    if (userInfo) {
      this.setData({
        userInfo: userInfo
      });
    }

    // 根据本地存储数据设置 isVerified 状态
    if (studentData || verifiedData) {
      this.setData({
        isVerified: true
      });
    } else {
      this.setData({
        isVerified: false
      });
    }
  }
});
